package com.example.ctrl;


import com.example.entity.User;
import com.example.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author weir
 * @since 2017-04-11
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private IUserService userService;


    @RequestMapping("/test2")

    public String test2() {
        User u=new User();

        u.setAge(1);
        u.setName("asd");
        u.setPhone("sadf");
        userService.insert(u);
     return "asdfasd";

    }



}